package com.neu.envprotection.admin.feign;

import com.neu.envprotection.admin.dao.entity.User;
import com.neu.envprotection.admin.dto.resp.GetVerifyCodeRespDto;
import com.neu.envprotection.common.resp.RestResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户微服务调用客户端
 *
 */
@Component
@FeignClient(value = "env-admin-service")
public interface UserFeign {
    @PostMapping("/api/inner/admin/selectById/{id}")
    RestResp<User> selectById(@PathVariable Integer id);

    @PostMapping("/api/inner/admin/updateById")
    RestResp<Void> updateById(@RequestBody User user);

    @PostMapping("/api/inner/admin/getVerifyCode")
    RestResp<String> getVerifyCode();

    @PostMapping("/api/inner/admin/storeVerifyCode")
    RestResp<Void> storeVerifyCode(GetVerifyCodeRespDto dto);

}
